//
//  ADViewController.m
//  囧途而行
//r
//  Created by Dupengfei on 16/5/13.
//  Copyright © 2016年 YSKJ. All rights reserved.
//

#import "ADViewController.h"

@interface ADViewController ()

@property (nonatomic, strong) UIWebView * webView;

@end

@implementation ADViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self initializeInterface];
    
     [self initializeDateSource];

}

-(void)initializeInterface
{
    self.view.backgroundColor =[UIColor whiteColor];
    
    [self.view addSubview:self.webView];

    
}

-(void)initializeDateSource
{
       NSURLRequest * request = [NSURLRequest requestWithURL:_url];
         [_webView loadRequest:request];
}

-(UIWebView *)webView
{
    if (!_webView) {
        _webView =[[UIWebView alloc]init];
        _webView.frame =self.view.frame;
        _webView.scalesPageToFit = YES;
    }
    return _webView;
}


-(void)setUrl:(NSURL *)url
{
    _url =url;
}
@end
